package com.aspose.cells;

class zavj extends zbz {
   zavj() {
      this.c(2155);
   }

   void a(DataLabels var1) {
      String var2 = var1.getSeparatorValue();
      if (var2 == null) {
         var2 = "";
      }

      if (var2 != null && var2.length() > 255) {
         var2 = var2.substring(0, 255);
      }

      switch(var1.getSeparator()) {
      case 0:
         this.b(16);
         break;
      case 1:
      case 5:
         this.b(19);
         break;
      case 2:
      case 3:
      case 4:
         this.b(21);
         break;
      case 6:
         if (var2.length() == 0) {
            this.b(16);
         } else {
            this.a((short)(17 + var2.length() * 2));
         }
      }

      this.c = new byte[this.d()];
      this.c[0] = 107;
      this.c[1] = 8;
      this.c[12] = 0;
      if (var1.getShowSeriesName()) {
         this.c[12] = (byte)(this.c[12] | 1);
      }

      if (var1.getShowCategoryName()) {
         this.c[12] = (byte)(this.c[12] | 2);
      }

      if (var1.getShowValue()) {
         this.c[12] = (byte)(this.c[12] | 4);
      }

      if (var1.getShowPercentage()) {
         this.c[12] = (byte)(this.c[12] | 8);
      }

      if (var1.getShowBubbleSize()) {
         this.c[12] = (byte)(this.c[12] | 16);
      }

      if (var1.getSeparator() != 0 || var2.length() != 0) {
         this.c[16] = 1;
         switch(var1.getSeparator()) {
         case 1:
            this.c[14] = 1;
            this.c[17] = 32;
            break;
         case 2:
            this.c[14] = 2;
            this.c[17] = 44;
            this.c[19] = 32;
            break;
         case 3:
            this.c[14] = 2;
            this.c[17] = 59;
            this.c[19] = 32;
            break;
         case 4:
            this.c[14] = 2;
            this.c[17] = 46;
            this.c[19] = 32;
            break;
         case 5:
            this.c[14] = 1;
            this.c[17] = 10;
            break;
         case 6:
            this.c[14] = (byte)var2.length();
            int var3 = 17;

            for(int var4 = 0; var4 < var2.length(); ++var4) {
               this.c[var3] = (byte)var2.charAt(var4);
               var3 += 2;
            }
         }

      }
   }
}
